package static_;

/**
 * @author wly
 * @create 2022-11-26 15:35
 */
public class StaticMethod {
    public static void main(String[] args) {
        System.out.println(args.length);
//        System.out.println(args[0]);
        Student tom = new Student("tom");
        Student marry = new Student("marry");
        tom.payFee(100.09);
        marry.payFee(4565.44);
        tom.showFee();
    }
}

class Student{
    private String name;
    private static double fee;

    public Student(String name) {
        this.name = name;
    }

    public static void payFee(double fee){
        System.out.println("同学缴费 " + fee);
        Student.fee += fee;
    }

    public void showFee(){
        System.out.println("总共缴费 " + Student.fee);
    }
}